<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .wai {
            width: 500px;
            height: 500px;
            background-color: pink;
        }

        .zhong {
            width: 300px;
            height: 300px;
            background-color: blue;
        }

        .nei {
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>

<body>
    <div class="wai">
        <div class="zhong">
            <div class="nei"></div>
        </div>
    </div>
    <script>
        var getwai = document.querySelector(".wai")
        getwai.onmouseout = function () {
            console.log("?")
        }
        getwai.onmouseover = function () {
            console.log("!")
        }
    </script>
</body>

</html>